/**
 * tzdesk系统平台
 * moonvip_admin
 * com.tz.service.servicepicture
 * IServicePictureService.java
 * 创建人:小胡 
 * 时间：2017年04月09日 13:56:23
 *
 */
package com.tz.service.servicepicture.impl;

import com.tz.bean.ServicePicture;
import com.tz.bean.TzParams;
import com.tz.dao.servicepicture.IServicePictureMapper;
import com.tz.service.servicepicture.IServicePictureService;
import com.tz.util.TmStringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * 服务_图片中间表serviceImpl
 * IServicePictureService
 * 创建人:小胡 
 * 时间：2017年04月09日 13:56:23
 * @version 1.0.0
 * 
 */
@Service
public class ServicePictureServiceImpl implements IServicePictureService{

	@Autowired
	private IServicePictureMapper servicepictureMapper;
	
	@Override
	public List<ServicePicture> findServicePictures(TzParams params){
		if(TmStringUtils.isEmpty(params.getOrder()))params.setOrder("create_time desc");
		return servicepictureMapper.findServicePictures(params);
	}
	
	@Override
	public int count(TzParams params) {
		return servicepictureMapper.count(params);
	}

	@Override
	public HashMap<String ,Object> getServicePicture(Integer id) {
		return servicepictureMapper.getServicePicture(id);
	}

	@Override
	public int save(ServicePicture servicepicture) {
		return servicepictureMapper.save(servicepicture);
	}

	@Override
	public int update(ServicePicture servicepicture) {
		return servicepictureMapper.update(servicepicture);
	}

	@Override
	public int delete(Integer id) {
		return servicepictureMapper.delete(id);
	}
}
